{*
 * This file is part of the Agora distribution. 
 * Detailed copyright and licensing information can be found
 * in the gpl-3.0.txt file which should be included in the distribution.
 * 
 * @version		$Id: 3.0.14 Olympus 2010-09-28 rammstein4o $
 * @copyright  2007 - 2010 jVitals
 * @license   GPLv3 Open Source
 * @link       http://jvitals.com
 * @since      File available since initial release
 *}	

<div style="float:left; width: 10%;">
	{include file=configuration/links.tpl}
</div>

{$html->toolbar->title('Edit smile')}
{$html->toolbar->save()}
{$html->toolbar->cancel()}

<div style="float:right; width: 90%;">

	<form name="adminForm" method="POST" enctype="multipart/form-data">
		{$html->form->param('option','com_agora')}
		{$html->form->param('task','configuration')}
		{$html->form->param('agora_task','configuration')}
		{$html->form->param('page','smilies')}
		{$html->form->param('action','save')}

		{$html->form->param('id',$form.id)}

    {* !!! - unsure if this is neccessary *}
    <input type="hidden" name="MAX_FILE_SIZE" value="100000" />

		<fieldset>
			<legend>##Edit smile##</legend>
			<table  class="adminlist" cellpadding="0" cellspacing="0">
				<tr valign="top">
					<td class="key editlinktip hasTip" title="##Smiley Code##::##Smiley Code Description##"><strong>##Smiley Code##</strong></td>
					<td>
						<input type="text" name="smiley_code" size="25" value="{$form.text}"/>
				  </td>
				</tr>

				<tr valign="top">
					<td class="editlinktip hasTip" title="##Smiley Image##::##Smiley Image Description##"><strong>##Smiley Image##</strong></td>
					<td>
						<!--<input type="text" name="smiley_image" size="25" value="{$form.image}"/>-->
             <div id="smileyImgList" style="height: 170px;overflow-y:scroll; border:1px solid #CCCCCC;">
              {* loop through and place each image in the list *}
              {foreach from=$fileList item=file}
                <div>
                  {if $file eq $form.image}
                    <input type="radio" name="smiley_image" value="{$file}" checked />&nbsp;
                  {else}
                    <input type="radio" name="smiley_image" value="{$file}" />&nbsp;
                  {/if}
                  <img src="{$smileyPath}{$file}" />&nbsp;
                  {$file}
                </div>
              {/foreach}
            </div>
				  </td>
				</tr>

        <tr valign="top">
          <th class="editlinktip hasTip" title="##Upload Smiley##::##Upload Smiley_2##" scope="row">##Upload Smiley##			</th>
          <td>
            <input type="file" name="smiley_upload" id="smiley_upload" />
          </td>
        </tr>

		</table>
		</fieldset>
	</form>
</div>